/*
 * author      : 吴中勤 
 * date        : 2019/3/29
 * description : TODO
 */

package org.wzq.learn;

import java.sql.Connection;

/*
 * 内部使用的保存数据库连接的类
 * 两个成员变量：连接、是否正在使用
 */
class PooledConnection {
    private Connection con = null;//连接
    private boolean busy = false;//是否正在使用，默认为非

    /*构造函数*/
    public PooledConnection(Connection con) {
        this.con = con;
    }

    /**
     * @return the con
     */
    public Connection getCon() {
        return con;
    }

    /**
     * @param con the con to set
     */
    public void setCon(Connection con) {
        this.con = con;
    }

    /**
     * @return the busy
     */
    public boolean isBusy() {
        return busy;
    }

    /**
     * @param busy the busy to set
     */
    public void setBusy(boolean busy) {
        this.busy = busy;
    }
}